from django.db import models
from django.contrib.auth.models import AbstractUser

# Create your models here.

class Users(models.Model):
    username = models.CharField(
        max_length=150,
        unique=True,
        db_index=True,
        verbose_name="用户账号",
        help_text="用户账号",
    )
    email = models.EmailField(
        max_length=255, verbose_name="邮箱", null=True, blank=True, help_text="邮箱"
    )
    mobile = models.CharField(
        max_length=255, verbose_name="电话", null=True, blank=True, help_text="电话"
    )
    avatar = models.CharField(
        max_length=255, verbose_name="头像", null=True, blank=True, help_text="头像"
    )
    name = models.CharField(max_length=40, verbose_name="姓名", help_text="姓名")
    GENDER_CHOICES = (
        (0, "未知"),
        (1, "男"),
        (2, "女"),
    )
    gender = models.IntegerField(
        choices=GENDER_CHOICES,
        default=0,
        verbose_name="性别",
        null=True,
        blank=True,
        help_text="性别",
    )
